// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import vueRouter from 'vue-router';

Vue.config.productionTip = false;

//导入路由对象
import hoad from './components/hoad.vue';
import left from './components/left.vue';
import homepage from './components/homepage.vue';
import cont from './components/cont.vue';
import login from './components/login.vue';
import log_out from './components/log_out.vue';
import feedback from './components/feedback.vue';
import userinfo from './components/use_control/userinfo.vue';
import vehicle_information from './components/use_control/vehicle_information.vue';
import add_vehicle from './components/use_control/add_vehicle.vue';
import vehicle_type from './components/vehicle_management/vehicle_type.vue';
import number_vehicles from './components/vehicle_management/number_vehicles.vue';
import cost_details from './components/expense_management/cost_details.vue';

//路由规则
var router1 = new vueRouter({
  routes:[
    {path:"/",redirect:'/homepage'},
    {path:'/login ',component:login },
    {path:'/homepage',component:homepage}, //首页
    {path:'/feedback',component:feedback}, //问题反馈
    {path:'/hoad',component:hoad}, //头部
    {path:'/left',component:left}, //左部
    {path:'/cont',component:cont}, //内容区
    {path:'/log_out',component:log_out},//注销
    //用户管理
    {path:'/use_control/userinfo',component:userinfo,},//用户信息
    {path:'/use_control/vehicle_information',component:vehicle_information},//车辆信息
    {path:'/use_control/add_vehicle',component:add_vehicle},//添加车辆
     //车辆管理
    {path:'/vehicle_management/vehicle_type',component:vehicle_type}, //车辆类型
    {path:'/vehicle_management/number_vehicles',component:number_vehicles},  //车辆数量
     //费用管理
    {path:'/expense_management/cost_details',component:cost_details}  //费用详情

  ]

});

//导入mint-ui组件1对象
import mintui from 'mint-ui';
//导入mint-ui的css文件
import 'mint-ui/lib/style.min.css';
//在vue全局中使用mintui
Vue.use(mintui);



//注册mui的CSS样式
import '../static/mui/css/mui.css';

// 将vue-resource在vue中帮定，自动在vue对象实例上注入一个￥http对象就可以使用ajax对象了
import vueResource from 'vue-resource';
Vue.use(vueResource);

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router:router1,
  components: { App },
  template: '<App/>'
})
